package week04.homework01MazeGame.model.item.potion;

import java.util.Map;

/**
 * @author li
 */
public class PotionFactory {

    public static String[] getPotionNames() {
        return POTIONS.keySet().toArray(new String[0]);
    }

    private static final Map<String, BasePotion> POTIONS = Map.of(
            "魔法药水", new ManaPotion(),
            "生命药水", new HealthPotion(),
            "铁皮药水", new IronSkinPotion()
    );

    public static BasePotion getPotion(String potionName) {
        return POTIONS.get(potionName);
    }

}
